package hrm.action.factory;

import hrm.action.Action;
import hrm.action.ActionFactory;
import hrm.action.cam.BeforePreCamInsert;
import hrm.action.cam.CamCancel;
import hrm.action.cam.CamIndexAction;
import hrm.action.cam.CamListCheck;
import hrm.action.cam.CheckCam;
import hrm.action.cam.DecideCam;
import hrm.action.cam.PreCamControl;
import hrm.action.cam.PreCamInsert;
import hrm.action.cam.PreCamSelect;
import hrm.action.cam.PreCamUpdate;
import hrm.action.cam.SearchCam;
import hrm.action.cam.SearchPreCam;

public class CamActionFactory implements ActionFactory {
	private static CamActionFactory factory;
	
	public static CamActionFactory getInstance(){
		if(factory==null){
			factory=new CamActionFactory();
		}
		return factory;
	}

	public Action getAction(String command){
		Action action=null;
		if(command.equalsIgnoreCase("index")){
			action=new CamIndexAction();
		}else if(command.equalsIgnoreCase("bfprecaminsert")){
			action=new BeforePreCamInsert();
		}else if(command.equalsIgnoreCase("precaminsert")){
			action=new PreCamInsert();
		}else if(command.equalsIgnoreCase("precamcontrol")){
			action=new PreCamControl();
		}else if(command.equalsIgnoreCase("precamselect")){
			action=new PreCamSelect();
		}else if(command.equalsIgnoreCase("decidecam")){
			action=new DecideCam();
		}else if(command.equalsIgnoreCase("precamupdate")){
			action=new PreCamUpdate();
		}else if(command.equalsIgnoreCase("searchprecam")){
			action=new SearchPreCam();
		}else if(command.equalsIgnoreCase("checkcam")){
			action=new CheckCam();
		}else if(command.equalsIgnoreCase("searchcam")){
			action=new SearchCam();
		}else if(command.equalsIgnoreCase("camcheck")){
			action=new CamListCheck();
		}else if(command.equalsIgnoreCase("camCancel")){
			action=new CamCancel();
		}
		return action;
	}
}
